package yazan.com.pdacollector_android.model;


import android.os.Parcel;
import android.os.Parcelable;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;

import java.util.Date;

@Entity
public class Goods implements Parcelable {
    @Id(autoincrement = true)
    private long id;
    private long Forder_id;
    private int FIndex;
    private String Forder_sn;
    private String Fgoods_name;
    private String Fgoods_spec;
    private String Fgoods_sn;
    private int Fgoods_qty;
    private int validation_type;//是否验证 0 未验证 1 已验证
    private int validation_count;//已经扫描的个数
    private int page_index;//当前商品保存的时候,订单页码是多少.
    private Date FOrderDate;//订单时间
    private int Fiscode; //追溯码标识,[int] 1为标识，0为未标识--2021-07-03新增

    private String Fgoods_codes;//商品对应的追溯码，需要扫码填入


    protected Goods(Parcel in) {
        id = in.readLong();
        Forder_id = in.readLong();
        FIndex = in.readInt();
        Forder_sn = in.readString();
        Fgoods_name = in.readString();
        Fgoods_spec = in.readString();
        Fgoods_sn = in.readString();
        Fgoods_qty = in.readInt();
        validation_type = in.readInt();
        validation_count = in.readInt();
        page_index = in.readInt();
        Fiscode = in.readInt();
        Fgoods_codes = in.readString();
    }

    @Generated(hash = 1447767436)
    public Goods(long id, long Forder_id, int FIndex, String Forder_sn,
            String Fgoods_name, String Fgoods_spec, String Fgoods_sn,
            int Fgoods_qty, int validation_type, int validation_count,
            int page_index, Date FOrderDate, int Fiscode, String Fgoods_codes) {
        this.id = id;
        this.Forder_id = Forder_id;
        this.FIndex = FIndex;
        this.Forder_sn = Forder_sn;
        this.Fgoods_name = Fgoods_name;
        this.Fgoods_spec = Fgoods_spec;
        this.Fgoods_sn = Fgoods_sn;
        this.Fgoods_qty = Fgoods_qty;
        this.validation_type = validation_type;
        this.validation_count = validation_count;
        this.page_index = page_index;
        this.FOrderDate = FOrderDate;
        this.Fiscode = Fiscode;
        this.Fgoods_codes = Fgoods_codes;
    }

    @Generated(hash = 1770709345)
    public Goods() {
    }


    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(id);
        dest.writeLong(Forder_id);
        dest.writeInt(FIndex);
        dest.writeString(Forder_sn);
        dest.writeString(Fgoods_name);
        dest.writeString(Fgoods_spec);
        dest.writeString(Fgoods_sn);
        dest.writeInt(Fgoods_qty);
        dest.writeInt(validation_type);
        dest.writeInt(validation_count);
        dest.writeInt(page_index);
        dest.writeInt(Fiscode);
        dest.writeString(Fgoods_codes);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<Goods> CREATOR = new Creator<Goods>() {
        @Override
        public Goods createFromParcel(Parcel in) {
            return new Goods(in);
        }

        @Override
        public Goods[] newArray(int size) {
            return new Goods[size];
        }
    };

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public long getForder_id() {
        return Forder_id;
    }

    public void setForder_id(long forder_id) {
        Forder_id = forder_id;
    }

    public int getFIndex() {
        return FIndex;
    }

    public void setFIndex(int FIndex) {
        this.FIndex = FIndex;
    }

    public String getForder_sn() {
        return Forder_sn;
    }

    public void setForder_sn(String forder_sn) {
        Forder_sn = forder_sn;
    }

    public String getFgoods_name() {
        return Fgoods_name;
    }

    public void setFgoods_name(String fgoods_name) {
        Fgoods_name = fgoods_name;
    }

    public String getFgoods_spec() {
        return Fgoods_spec;
    }

    public void setFgoods_spec(String fgoods_spec) {
        Fgoods_spec = fgoods_spec;
    }

    public String getFgoods_sn() {
        return Fgoods_sn;
    }

    public void setFgoods_sn(String fgoods_sn) {
        Fgoods_sn = fgoods_sn;
    }

    public int getFgoods_qty() {
        return Fgoods_qty;
    }

    public void setFgoods_qty(int fgoods_qty) {
        Fgoods_qty = fgoods_qty;
    }

    public int getValidation_type() {
        return validation_type;
    }

    public void setValidation_type(int validation_type) {
        this.validation_type = validation_type;
    }

    public int getValidation_count() {
        return validation_count;
    }

    public void setValidation_count(int validation_count) {
        this.validation_count = validation_count;
    }

    public int getPage_index() {
        return page_index;
    }

    public void setPage_index(int page_index) {
        this.page_index = page_index;
    }

    public Date getFOrderDate() {
        return FOrderDate;
    }

    public void setFOrderDate(Date FOrderDate) {
        this.FOrderDate = FOrderDate;
    }

    public int getFiscode() {
        return Fiscode;
    }

    public void setFiscode(int fiscode) {
        Fiscode = fiscode;
    }

    public String getFgoods_codes() {
        return Fgoods_codes;
    }

    public void setFgoods_codes(String fgoods_codes) {
        Fgoods_codes = fgoods_codes;
    }
}
